<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>全局组件案例1</title>
    <script src="vue.js"></script>
</head>
<body>
    <div id="app1">
        <hello></hello>
        <hello></hello>
        <hello></hello>
    </div>
</body>
</html>
<script>
    /*
      1.全局组件的位置:vue实例之前
    */
    Vue.component('hello',{
        template:'<h1 style="background-color:red;color:white">Hello Vue</h1>'
    });
    var vm=new Vue({ 
        el:'#app1'
    });
</script>